load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "go_default_library",
    srcs = [
        "cmd.go",
        "flags.go",
        "templates.go",
    ],
    importpath = "github.com/uber/prototool/internal/cmd",
    visibility = ["//:__subpackages__"],
    deps = [
        "//internal/exec:go_default_library",
        "@com_github_mitchellh_go_wordwrap//:go_default_library",
        "@com_github_spf13_cobra//:go_default_library",
        "@com_github_spf13_cobra//doc:go_default_library",
        "@com_github_spf13_pflag//:go_default_library",
        "@org_uber_go_zap//:go_default_library",
        "@org_uber_go_zap//zapcore:go_default_library",
    ],
)

go_test(
    name = "go_default_test",
    srcs = ["cmd_test.go"],
    data = glob(["testdata/**"]),
    embed = [":go_default_library"],
    deps = [
        "//internal/cmd/testdata/grpc/gen/grpcpb:go_default_library",
        "//internal/lint:go_default_library",
        "//internal/settings:go_default_library",
        "//internal/vars:go_default_library",
        "@com_github_golang_protobuf//proto:go_default_library",
        "@com_github_golang_protobuf//protoc-gen-go/descriptor:go_default_library",
        "@com_github_stretchr_testify//assert:go_default_library",
        "@com_github_stretchr_testify//require:go_default_library",
        "@org_golang_google_grpc//:go_default_library",
        "@org_golang_google_grpc//codes:go_default_library",
        "@org_golang_google_grpc//credentials:go_default_library",
        "@org_golang_google_grpc//status:go_default_library",
    ],
)
